import {BasicColumn, FormSchema} from '/@/components/Table';

export const columns: BasicColumn[] = [
  {
    title: '租户编号',
    dataIndex: 'tenantId',
  },
  {
    title: '商户号',
    dataIndex: 'mchNo',
  },
  {
    title: '应用ID',
    dataIndex: 'appId',
  },
  {
    title: '支付渠道',
    dataIndex: 'channelCode',
  },
  {
    title: '支付方式',
    dataIndex: 'wayCode',
  },
  {
    title: '支付方式费率',
    dataIndex: 'rate',
  },
  {
    title: '风控数据',
    dataIndex: 'riskConfig',
  },
  {
    title: '状态：0-停用, 1-正常',
    dataIndex: 'status',
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'tenantId',
    label: '租户编号',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    field: 'mchNo',
    label: '商户号',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    field: 'appId',
    label: '应用ID',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    field: 'channelCode',
    label: '支付渠道',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    field: 'wayCode',
    label: '支付方式',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    field: 'rate',
    label: '支付方式费率',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    field: 'riskConfig',
    label: '风控数据',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    field: 'status',
    label: '状态：0-停用, 1-正常',
    component: 'Input',
    colProps: {span: 6},
  },
];

export const formSchema: FormSchema[] = [
  {
    field: 'id',
    label: 'ID',
    component: 'Input',
    show: false,
  },
  {
    field: 'tenantId',
    label: '租户编号',
    component: 'Input',
    required: true,
  },
  {
    field: 'mchNo',
    label: '商户号',
    component: 'Input',
    required: true,
  },
  {
    field: 'appId',
    label: '应用ID',
    component: 'Input',
    required: true,
  },
  {
    field: 'channelCode',
    label: '支付渠道',
    component: 'Input',
    required: true,
  },
  {
    field: 'wayCode',
    label: '支付方式',
    component: 'Input',
    required: true,
  },
  {
    field: 'rate',
    label: '支付方式费率',
    component: 'Input',
    required: true,
  },
  {
    field: 'riskConfig',
    label: '风控数据',
    component: 'Input',
    required: true,
  },
  {
    field: 'status',
    label: '状态：0-停用, 1-正常',
    component: 'Input',
    required: true,
  },
];
